package com.woniuxy.mapper;

import com.woniuxy.entity.Food;
import com.woniuxy.entity.FoodComment;
import com.woniuxy.entity.FoodExample;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

/**
 * @author Hgx
 * @ClassName FoodMapper
 * @create 2020-05-26 9:14
 */
public interface FoodMapper {
    long countByExample(FoodExample example);

    int deleteByExample(FoodExample example);

    int deleteByPrimaryKey(Integer foodId);

    int insert(Food record);

    int insertSelective(Food record);

    List<Food> selectByExample(FoodExample example);

    Food selectByPrimaryKey(Integer foodId);

    int updateByExampleSelective(@Param("record") Food record, @Param("example") FoodExample example);

    int updateByExample(@Param("record") Food record, @Param("example") FoodExample example);

    int updateByPrimaryKeySelective(Food record);

    int updateByPrimaryKey(Food record);
    /**
     *  按照美食名  和营地地点动态条件查询 美食
     * @param map
     * @return
     */
    List<Food> selectByFoodNameAndCampId(Map map);

    /**
     * 查询美食商品详情需要foodId
     * @param foodId
     * @return
     */
    Food selectFoodByFoodId(Integer foodId);


}